﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Common.Model;
using Common.Error;
using OpenAPI.Model.API;

namespace OpenAPI.IDAL.API
{
    public interface IMethod
    {
        #region 分类管理

        bool AddCategory(MethodCategoryInfo category, out ErrorType error);
        bool ModifyCategory(MethodCategoryInfo category, out ErrorType error);
        bool DeleteCategory(string category_cd, out ErrorType error);

        MethodCategoryInfo GetCategory(string category_cd);
        IList<MethodCategoryInfo> GetCategories();

        #endregion

        #region 方法管理

        bool Add(MethodInfo method, out ErrorType error);
        bool Mod(MethodInfo method, out ErrorType error);
        bool Delete(string method_name, out ErrorType error);


        IList<MethodInfo> GetMethods(string used_yn);
        MethodInfo GetMethod(string method_name);
        #endregion

        #region 参数管理

        bool AddSignArgument(MethodSignArgumentInfo argument, out ErrorType error);
        bool DeleteSignArgument(string method_name,string argument_name, out ErrorType error);

        bool AddUnSignArgument(MethodUnSignArgumentInfo argument, out ErrorType error);
        bool DeleteUnSignArgument(string method_name, string argument_name, out ErrorType error);

        IList<MethodUnSignArgumentInfo> GetUnSignArguments(string api_method);
        IList<MethodSignArgumentInfo> GetSignArguments(string api_method);

        #endregion

    }
}
